package com.gopay.checkorder.service.sentinel;

import com.gopay.common.domain.bank.BankOrder;
import com.gopay.common.domain.bank.BcdlResult;
import com.gopay.common.domain.bank.bcdl.BcdlPacketRes;
import com.gopay.common.domain.cps.vo.CheckOrderResult;
/**
 * 熔断机制
 * @author lizheng
 *
 */
public interface BcdlOrderSentinel {
	public Boolean isFuse();
	public String getBank();
	public Boolean restart();
	public Boolean stop(int flag);
	public void patrol(BankOrder bankOrder,BcdlResult result);
	public void checkPartol(BankOrder bankOrder,  CheckOrderResult result);
	public void batchPatrol(String packetNo, BcdlResult result, BcdlPacketRes res);
	public void batchCheckPatrol(String packetNo,BcdlPacketRes res);

	public String getSentinelId();
	/**
	 * 定时熔断
	 * @param sq
	 * @return
	 */
	void stopForTime(Long sq);

	/**
	 * 结束定时熔断
	 * @param sq
	 * @return
	 */
	void restartForTime(Long sq);
}
